//
//  LzwLoginView.m
//  NewHalfsugar
//
//  Created by 刘志武 on 16/1/6.
//  Copyright © 2016年 刘志武. All rights reserved.
//

#import "LzwLoginView.h"

@implementation LzwLoginView

-(void)dealloc{
    [_myText1 release];
    [_myText2 release];
    [_myText3 release];
    [_myText4 release];
    [_myText5 release];
    [_myLable1 release];
    [_myLable2 release];
    [_myLable3 release];
    [_myLable4 release];
    [_myLable5 release];
    [super dealloc];
}


- (instancetype)initWithFrame:(CGRect)frame{
    
    self = [super initWithFrame:frame];
    
    if (self) {
        [self creatLoginView];
    }
    return self;
}
//键盘回收
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
    
    [textField resignFirstResponder];
    
    return YES;
}


- (void)creatLoginView{
    
    
    self.myLable1 = [[UILabel alloc]initWithFrame:CGRectMake(30 * WIDTH, 140 * WIDTH, 80 * WIDTH, 30 * WIDTH)];
    self.myLable1.text = @"用户名";
    self.myLable1.textAlignment = 1;
    [self addSubview:self.myLable1];
    
    
    self.myLable2 = [[UILabel alloc]initWithFrame:CGRectMake(30 * WIDTH, 180 * WIDTH, 80 * WIDTH, 30 * WIDTH)];
    self.myLable2.text = @"密码";
    self.myLable2.textAlignment = 1;
    [self addSubview:self.myLable2];
    
    self.myLable3 = [[UILabel alloc]initWithFrame:CGRectMake(30 * WIDTH, 220 * WIDTH, 80 * WIDTH, 30 * WIDTH)];
    self.myLable3.text = @"确认密码";
    self.myLable3.textAlignment = 1;
    [self addSubview:self.myLable3];
    
    
    self.myLable4 = [[UILabel alloc]initWithFrame:CGRectMake(30 * WIDTH, 260 * WIDTH, 80 * WIDTH, 30 * WIDTH)];
    self.myLable4.text = @"邮箱";
    self.myLable4.textAlignment = 1;
    
    [self addSubview:self.myLable4];
    
    
    self.myLable5 = [[UILabel alloc]initWithFrame:CGRectMake(30 * WIDTH, 300 * WIDTH, 80 * WIDTH, 30 * WIDTH)];
    self.myLable5.text = @"联系方式";
    self.myLable5.textAlignment = 1;
    
    [self addSubview:self.myLable5];
    
    
    self.myText1 = [[UITextField alloc]initWithFrame:CGRectMake(130 * WIDTH, 140 * WIDTH, 150 * WIDTH, 30 * WIDTH)];
    self.myText1.placeholder = @"请输入用户名";
    self.myText1.borderStyle = UITextBorderStyleRoundedRect;
    self.myText1.clearButtonMode = UITextFieldViewModeAlways;
    self.myText1.keyboardType = UIKeyboardTypeDefault;
    self.myText1.delegate = self;
    [self addSubview:self.myText1];
    
    self.myText2 = [[UITextField alloc]initWithFrame:CGRectMake(130 * WIDTH, 180 * WIDTH, 150 * WIDTH, 30 * WIDTH)];
    self.myText2.placeholder = @"请输入密码";
    self.myText2.borderStyle = UITextBorderStyleRoundedRect;
    self.myText2.clearButtonMode = UITextFieldViewModeAlways;
    self.myText2.secureTextEntry = YES;
    self.myText2.keyboardType = UIKeyboardTypeDefault;
    self.myText2.delegate = self;
    
    [self addSubview:self.myText2];
    
    self.myText3 = [[UITextField alloc]initWithFrame:CGRectMake(130 * WIDTH, 220 * WIDTH, 150 * WIDTH, 30 * WIDTH)];
    self.myText3.placeholder = @"再次输入密码";
    self.myText3.borderStyle = UITextBorderStyleRoundedRect;
    self.myText3.clearButtonMode = UITextFieldViewModeAlways;
    self.myText3.secureTextEntry = YES;
    self.myText3.delegate = self;
    
    self.myText3.keyboardType = UIKeyboardTypeDefault;
    [self addSubview:self.myText3];
    
    self.myText4 = [[UITextField alloc]initWithFrame:CGRectMake(130 * WIDTH, 260 * WIDTH, 150 * WIDTH, 30 * WIDTH)];
    self.myText4.placeholder = @"请输入邮箱";
    self.myText4.borderStyle = UITextBorderStyleRoundedRect;
    self.myText4.clearButtonMode = UITextFieldViewModeAlways;
    
    self.myText4.delegate = self;
    
    self.myText4.keyboardType = UIKeyboardTypeDefault;
    [self addSubview:self.myText4];
    
    
    self.myText5 = [[UITextField alloc]initWithFrame:CGRectMake(130 * WIDTH, 300 * WIDTH, 150 * WIDTH, 30 * WIDTH)];
    self.myText5.placeholder = @"请输入联系方式";
    self.myText5.borderStyle = UITextBorderStyleRoundedRect;
    self.myText5.clearButtonMode = UITextFieldViewModeAlways;
    self.myText5.delegate = self;
    
    self.myText5.keyboardType = UIKeyboardTypeDefault;
    [self addSubview:self.myText5];
    
    [_myLable1 release];
    [_myLable2 release];
    [_myLable3 release];
    [_myLable4 release];
    [_myLable5 release];
    [_myText1 release];
    [_myText2 release];
    [_myText3 release];
    [_myText4 release];
    [_myText5 release];
    
    
}

@end
